package com.typing.service.impl;

import com.typing.entity.WordsEntity;
import com.typing.mapper.WordsMapper;
import com.typing.service.WordsService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class WordServiceImpl implements WordsService {
	@Resource
	WordsMapper wordsMapper;

	@Override
	public List<WordsEntity> selectWords() {
		return wordsMapper.selectWords();
	}

	@Override
	public int addWord(WordsEntity words) {
		return wordsMapper.addWord(words);
	}

	@Override
	public WordsEntity hasWord(String english) {
		return wordsMapper.hasWord(english);
	}

	@Override
	public int deleteWord(WordsEntity word) {
		return wordsMapper.deleteWord(word);
	}

	@Override
	public int updateWord(WordsEntity word) {
		return wordsMapper.updateWord(word);
	}
}
